Skip to content

fix(packages-fetch): add Send bound to download_file_with_progress callbacks - #1295

Merged
zackees merged 2 commits into
mainfrom
fix/1286-download-progress-send
Aug 10, 2026
Merged

fix(packages-fetch): add Send bound to download_file_with_progress callbacks#1295
zackees merged 2 commits into
mainfrom
fix/1286-download-progress-send

Conversation

@zackees

@zackees zackees commented Aug 10, 2026

Copy link
Copy Markdown
Member

Problem

PR #1293 switched staged_install() to use download_file_with_progress() for progress reporting during toolchain downloads. However, the dyn FnMut callback parameter lacked an explicit + Send bound, causing the MSRV (1.94.1) CI check to fail:

error[E0277]: dyn for<'a> FnMut(&'a DownloadProgress) cannot be sent between threads safely

This affected every caller of staged_install() across fbuild-toolchain (arm, avr, esp32, riscv, rp2040, etc.).

Fix

Add + Send to the on_progress parameter in all three internal signatures:

  • download_file_with_progress
  • download_file_with_progress_using
  • download_file_with_progress_timed

The closures at the call sites already capture only Send types (String), so they satisfy the bound.

Testing

  • soldr cargo check -p fbuild-packages-fetch -p fbuild-toolchain — compiles clean
  • soldr cargo clippy -p fbuild-packages-fetch -- -D warnings — clean
  • soldr cargo test -p fbuild-packages-fetch -- downloader — all 15 tests pass

Follow-up to #1293.
Closes #1286

🤖 Generated with Claude Code

…llbacks

The download_file_with_progress function takes a dyn FnMut callback,
but without an explicit Send bound the async block in staged_install
fails the Send check on MSRV 1.94.1.

Add Send to all three internal signatures.

Follow-up to PR 1293.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@zackees, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 28 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e11b58ce-b390-4405-a12a-2c2b2d09fa8f

📥 Commits

Reviewing files that changed from the base of the PR and between 9276692 and 6a445f4.

📒 Files selected for processing (1)
  • crates/fbuild-packages-fetch/src/downloader.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zackees
zackees merged commit 3bb8f4d into main Aug 10, 2026
11 of 92 checks passed
@zackees
zackees deleted the fix/1286-download-progress-send branch August 10, 2026 00:38
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

bash compile nrfmicro_nrf52840 produces boring output

1 participant